﻿/***********************************************************************
* Module:  CPF.h
* Author:  ZHANGHASI
* Modified: 2020年12月7日 下午 3:49:55
***********************************************************************/

#ifndef __CPF_H__
#define __CPF_H__

// 禁用警告
#pragma warning(disable:4251)
#pragma warning(disable:4067)

// 导出库动态函数名称
#define CPF_CREATE_INSTANCE "cpf_create_instance"



#ifdef CPF_API

#ifdef LINUX_OS || MAC_OS

    #define CPF_EXPORT __attribute__((visibility("default")))

#else 

    #define CPF_EXPORT __declspec(dllexport)

#endif


#else

#ifdef LINUX_OS || MAC_OS

    #define CPF_EXPORT __attribute__((visibility("hidden")))

#else 

    #define CPF_EXPORT __declspec(dllimport)

#endif

#endif // !CPF_API


#ifndef CPF_API

    #ifdef LINUX_OS || MAC_OS
    
        #ifdef __cplusplus
            #define CPF_OBJECT_API extern "C"
        #else
            #define CPF_OBJECT_API
        #endif

    #else

        #ifdef __cplusplus
            #define CPF_OBJECT_API extern "C" __declspec(dllexport)
        #else
            #define CPF_OBJECT_API extern "C"
        #endif

    #endif

#else

    #ifdef LINUX_OS || MAC_OS
        
        #ifdef __cplusplus
            #define CPF_OBJECT_API extern "C"
        #else
            #define CPF_OBJECT_API
        #endif

    #else 

        #ifdef __cplusplus
            #define CPF_OBJECT_API extern "C" __declspec(dllimport)
        #else
            #define CPF_OBJECT_API extern "C"
        #endif

    #endif

#endif


// 定义各个系统动态库后缀字符串
#ifdef LINUX_OS

    #define CPF_PLUGIN_SUFFIX ".so"

#elif MAC_OS 

    #define CPF_PLUGIN_SUFFIX ".dylib"

#else

    #define CPF_PLUGIN_SUFFIX ".dll"

#endif

// 版本号
#define CPF_VERSION "V1.0.0.0";

#endif // __CPF_H__


